class Solution {
public String[] findWords(String[] words) {
        String s1="qwertyuiopQWERTYUIOP";
        String s2="asdfghjklASDFGHJKL";
        String s3="zxcvbnmZXCVBNM";
        List<String> list=new ArrayList<>();
        for(String num:words)
        {
            int len=num.length();
            int n1=0,n2=0,n3=0;
            for(int i=0;i<len;i++)
            {
                if(s1.contains(num.charAt(i)+""))
                n1++;
                else if(s2.contains(num.charAt(i)+""))
                n2++;
                else
                n3++;
            }
            if(n1==len||n2==len||n3==len)
            {
                list.add(num);
            }
        }
        return list.toArray(new String[list.size()]);
} 
}
